package com.study.springsecurity.pojo;

import com.study.springsecurity.constant.ErrorCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Description 返回结果集
 * @Author YL
 * @Create 2021/3/23 0:13
 * @Version 1.0
 */

@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
    private String code = ErrorCode.E000000.code();
    private String message = ErrorCode.E000000.msg();
    private T data;

    public Result(String code, String message) {
        this(code, message, null);
    }

    public Result(T data) {
        this.data = data;
    }
}
